{{define "Title"}}WIP Detail{{end}}
{{define "Content"}}

<fieldset>
  <legend><b>WIP Detail</b></legend>
</fieldset>

<script type=text/javascript src="/js/splitPage.js"></script>
<script type=text/javascript src="/js/wipPerPage.js"></script>
<script type=text/javascript src="/js/woWipSplit.js"></script>
<script type=text/javascript src="/js/tablestyle.js"></script>

{{if .ssn_main}}
<div class="content-box">
<span id=obj1 style="color: black">
<table id="tbl_ls" border="1" cellspacing="0" cellpadding="0">
  <thead>
    <tr>
      <th>Index</th>
      <th>Work Order</th>
      <th>Item</th>
      <th>Product No.</th>
      <th>Current Station</th>
      <th>Result</th>
      <th>FailCode</th>
    </tr>
  </thead>
  
  <tbody id="group_one">
  {{range .ssn_main}}
  <tr>
    {{if eq .Result "PASS" "NDF"}}
      <td id="detail_idx" fieldset style="color: #666666; border-style: groove; font-weight: bold; font-size: 14px" align="center" width="80">{{.Index | html}}</td>
      <td id="detail_won" fieldset style="color: #666666; border-style: groove; font-weight: bold; font-size: 14px" align="center" width="160">{{.Wono | html}}</td>
      <td id="detail_itm" fieldset style="color: #666666; border-style: groove; font-weight: bold; font-size: 14px" align="center" width="100">{{.Item | html}}</td>
      <td id="detail_ssn" fieldset style="color: #666666; border-style: groove; font-weight: bold; font-size: 14px" width="200"><a href="/queryssn?q={{.Serial | html}}">{{.Serial | html}}</a></td>
      <td id="detail_sta" fieldset style="color: #666666; border-style: groove; font-weight: bold; font-size: 14px" width="280">{{.Station | html}}</td>
      <td id="detail_rst" fieldset style="background: #00CC00; border-style: groove; font-weight: bold; font-size: 14px" align="center" width="80">{{.Result | html}}</td>
      <td id="detail_fcd" fieldset style="color: #666666; border-style: groove; font-weight: bold; font-size: 14px" width="160">{{.Failcode | html}}</td>
    {{else}}
      <td id="detail_idx" fieldset style="background: #EFF000; border-style: groove; font-weight: bold; font-size: 14px" align="center" width="80">{{.Index | html}}</td>
      <td id="detail_won" fieldset style="background: #EFF000; border-style: groove; font-weight: bold; font-size: 14px" align="center" width="160">{{.Wono | html}}</td>
      <td id="detail_itm" fieldset style="background: #EFF000; border-style: groove; font-weight: bold; font-size: 14px" align="center" width="100">{{.Item | html}}</td>
      <td id="detail_ssn" fieldset style="background: #EFF000; border-style: groove; font-weight: bold; font-size: 14px" width="200"><a href="/queryssn?q={{.Serial | html}}">{{.Serial | html}}</a></td>
      <td id="detail_sta" fieldset style="background: #EFF000; border-style: groove; font-weight: bold; font-size: 14px" width="280">{{.Station | html}}</td>
      <td id="detail_rst" fieldset style="background: #E00000; color: #EFF000; border-style: groove; font-weight: bold; font-size: 14px" align="center" width="80">{{.Result | html}}</td>
      <td id="detail_fcd" fieldset style="background: #EFF000; border-style: groove; font-weight: bold; font-size: 14px" width="160">{{.Failcode | html}}</td>
    {{end}}
  </tr>
  {{end}}
  </tbody>
</table>
</span>
</div>
<input type=hidden id="wonum" value="{{.wono | html}}">
<input type=hidden id="station" value="{{.station | html}}">
<input type=button id="ssnquery" value="ff" style="display:none">
<span id="spanFirst"><img id='first' src="/images/FirstPageImageUrl.gif" onclick="onFirstClick();"/></span> <span id="spanPre"><img id='prev' src="/images/PreviousPageImageUrl.gif" onclick="onPrevClick();"/></span> <span id="spanNext"><img id='next' src="/images/NextPageImageUrl.gif" onclick="onNextClick();"/></span> <span id="spanLast"><img id='last' src="/images/LastPageImageUrl.gif" onclick="onLastClick();"/></span> Page: <span id="spanPageNum">{{.curr_page}}</span> / Total: <span id="spanTotalPage">{{.total_page}}</span> <span><input id="specialnum" style="width: 60px; color: blue; font-size: 14px; font-weight: bold;" type="text" onkeydown="onSpecialKeydown();"></span><span id="GotoSpecial" style="font-size: 14px; font-weight: bold; cursor:hand; text-decoration:underline; color: #57a000;" onclick="onSpecialClick();">Goto!</span>

{{end}}
{{end}}